﻿using System;
using GSE;
using System.Threading;
namespace GSE.Network
{
    public interface Transport
    {
        int SendData(byte[] data);
        byte[] ReadData();
        int ReadData(byte[] buff);
        void Start();
        void KeepAlive();
        void SetReadTimeout(int timeout);
        void SetNetErrCancellationTokenSource(CancellationTokenSource cts);

        void Close();

        void ReceiveBufferSize(Int32 size);

        Int32 ReceiveBufferSize();

        void SendBufferSize(Int32 size);

        Int32 SendBufferSize();
    }

    public enum TransportType
    {
        UDP,
        TCP,
    }
}
